//
//  Utils
//  StockWin
//
//  Created by showshaw on 15/6/15.
//  Copyright (c) 2015年 ZhongQian. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CommonCrypto/CommonDigest.h>

@class UIViewController;

static const NSString * kCommonAPINameToken = @"token";
static const NSString * kCommonAPINameUserId = @"userId";

@interface Utils : NSObject
/**
 *  获取HostURL
 */
+(NSString*)apiHostURL;

/*
    获取API地址
 */
+ (NSString *)BaseUrlOfApi: (NSString *)key;

/*
    Web打开App 模块
 */
//+(void)jumpToModule:(UINavigationController *)naviController module:(NSString*)module type:(NSString*)type data:(NSString *)data;
/**
 *  跳转到消息.并且执行更多操作
 */
//+(void)jumpToMessageWithUserInfo:(NSDictionary*)userInfo navigtionController:(UINavigationController *)navigationController;

/**
 *  分割URI, 0为协议头 1:空 2:model 3:data
 */
+(NSArray*)arrayBySplitURI:(NSString*)URI;
/**
 *  跳到登录页
 */
+(void)jumpToLoginPage:(UIViewController*)currentViewController;
/**
 *  检查登录状况,未登录则跳转到登陆页
 */
+(void)checkLoginStatus:(UIViewController*)currentViewController;
//正则字符串验证
+ (BOOL)isRegularStr:(NSString *)str regex:(NSString *)regex;
@end
